/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.freedom.railhunter.util.mail;

/**
 *
 * @author Alan
 */
public class Test {

    public static void main(String[] args) {
        //这个类主要是设置邮件   
        MailSenderInfo mailInfo = new MailSenderInfo();
        mailInfo.setMailServerHost("smtp.126.com");
        mailInfo.setMailServerPort("25");
        mailInfo.setValidate(true);
        mailInfo.setUserName("kliumin@126.com");
        mailInfo.setPassword("alexlm19860315");//您的邮箱密码 
        mailInfo.setFromAddress("kliumin@126.com");
        mailInfo.setToAddress("357054853@qq.com");
        mailInfo.setSubject("邮件测试");
        mailInfo.setContent("邮件测试");
        //这个类主要来发送邮件   
        SimpleMailSender sms = new SimpleMailSender();
        sms.sendTextMail(mailInfo);//发送文体格式
    }
}
